package com.dc.system.service;

import com.dc.common.model.BaseModel;
import com.dc.system.model.SysDept;
import com.dc.system.model.SysOrgan;
import com.github.pagehelper.PageInfo;

import javax.servlet.http.HttpServletRequest;

/**
 * @Description: SysOrganService
 * @Author: ChenXueLi
 * @Date: 2018-05-05 9:19
 */
public interface SysOrganService {

    /**
     * 添加一个单位
     * @param sysOrgan
     * @param baseModel
     * @param request
     * @return
     * @throws Exception
     */
    BaseModel addSysOrgan(SysOrgan sysOrgan, BaseModel baseModel, HttpServletRequest request) throws Exception;

    /**
     * 根据单位id删除一个单位
     * @param sysOrgan
     * @param baseModel
     * @param request
     * @return
     * @throws Exception
     */
    BaseModel deleteSysOrganById(SysOrgan sysOrgan, BaseModel baseModel, HttpServletRequest request) throws Exception;

    /**
     * 根据单位id修改一个单位的信息
     * @param sysOrgan
     * @param baseModel
     * @param request
     * @return
     * @throws Exception
     */
    BaseModel updateSysOrganById(SysOrgan sysOrgan, BaseModel baseModel, HttpServletRequest request) throws Exception;

    /**
     * 分页查询所有单位
     * @param pageInfo
     * @param sysOrgan
     * @param sysDept
     * @param baseModel
     * @param request
     * @return
     * @throws Exception
     */
    BaseModel getSysOrgans(PageInfo<?> pageInfo, SysOrgan sysOrgan, SysDept sysDept, BaseModel baseModel, HttpServletRequest request) throws Exception;

}
